package com.mall.shopping.dto;

import com.mall.commons.result.AbstractRequest;
import com.mall.commons.tool.exception.ValidateException;
import com.mall.commons.tool.utils.ObjectIsEmptyUtils;
import com.mall.shopping.constants.ShoppingRetCode;
import lombok.Data;

/**
 * 类<code>Doc</code>用于：TODO
 *
 * @author Acher
 * @version 1.0
 * @date 2021-11-02
 */
@Data
public class SearchCompleteRequest extends AbstractRequest {

    private String keyword;

    @Override
    public void requestCheck() {
        if (ObjectIsEmptyUtils.stringIsEmpty(keyword)) {
            throw new ValidateException(ShoppingRetCode.REQUISITE_PARAMETER_NOT_EXIST.getCode(),ShoppingRetCode.REQUISITE_PARAMETER_NOT_EXIST.getMessage());
        }
    }
}
